import {pageTagsConfig} from './pageTagsConfig'
let {filesSavePath} = pageTagsConfig
// const fs = require("fs");
// const path = require("path");
// import fs from 'fs'
// import path from 'path'

// 创建文件夹
export function createFolder(folderPath) {
  if (!fs.existsSync(filesSavePath)) {
    fs.mkdirSync(filesSavePath, { recursive: true });
    console.log(`Folder ${filesSavePath} created`);
  } else {
    console.log(`Folder ${filesSavePath} already exists`);
  }
}
 
// 创建文件
export function createFile(filePath, content) {
  fs.writeFile(filePath, content, (err) => {
    if (err) throw err;
    console.log(`File ${filePath} created`);
  });
}
